package com.gem.day13;

import java.io.FileWriter;
import java.io.Writer;
import java.util.Scanner;

/**
 * 本类用来演示Java字符输出流
 * 
 * @author easonsy
 * 2020年8月6日 上午9:19:24
 */
public class WriterDemo {
	public static void main(String[] args) {
		try (Writer writer = new FileWriter("D:\\log.txt", true); Scanner scanner = new Scanner(System.in)) {
			System.out.println("请您输入内容: ");
			String input = scanner.nextLine();
			writer.write(input);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
